from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from models import *
import analyze_website

class MainPage(webapp.RequestHandler):
    
    def get(self):
        self.response.headers[u'Content-Type'] = u'text/plain'
        self.response.out.write(u'Hello World from $aveZone\n')
 
class DeleteAllHandler(webapp.RequestHandler):
    
    def get(self):
        self.response.headers[u'Content-Type'] = u'text/plain'
        self.response.out.write(u'Hello World from $aveZone - all database deleted\n')
        db.delete(Business.all())
        db.delete(Deal.all())
        db.delete(Comment.all())
        
application = webapp.WSGIApplication([(u'/database/delete_all', DeleteAllHandler), (u'/', MainPage)], debug=True)


def main():
    run_wsgi_app(application)

if __name__ == u'__main__':
    main()
